// 这是歌单请求函数的返回值的类型
// 返回值
/*
playList:[
    {
  "name": "捡钱的Penny祢的歌单",
  "id": 6671216522,
  "coverImgUrl": "http://p2.music.126.net/WsW5v606UdMxVzSWYWCvSw==/109951166327265012.jpg",
  "playCount": 1638086,
  "subscribers": [
    {
      "userId": 1332138674,
      "nickname": "L1ter",
    }
  ],
}
]
 */

// 歌单返回值类型
export interface SongListParams {
  playlists: SongList;
  total: number;
}

export type SongList = SongListItem[];

export interface SongListItem {
  name: string; //歌曲名
  id: number; //歌曲id
  coverImgUrl: string; //图片地址
  playCount: number; //应该是听歌人数
  creator: subscribersListItem; //订阅者相关信息
  updateTime: number; //最后一位的数据
}

// export type subscribersList = subscribersListItem[];

export interface subscribersListItem {
  userId: number;
  nickname: string;
}

// 请求参数
export interface GetSongListParams {
  limit: number;
  cat: string;
  order: string;
  offset?: number;
}

// 返回值
/*
categories: {0: '语种', 1: '风格', 2: '场景', 3: '情感', 4: '主题'}
code: 200
sub: [
activity: false
category: 4
hot: true
imgId: 0
imgUrl: null
name: "综艺"
resourceCount: 1000
resourceType: 0
type: 0
]
*/
// 歌单分类列表数据类型
export interface GetCatListParams {
  categories: CateforiesItem;
  sub: SubList;
}

export interface CateforiesItem {
  0: string;
  1: string;
  2: string;
  3: string;
  4: string;
}

export type SubList = SubListItem[];

export interface SubListItem {
  activity: false;
  category: number;
  name: string;
  resourceCount: number;
}

// 分类的类型
export type CatList = CatListItem[];

export interface CatListItem {
  // icon: string;
  name: string;
  list: OverCatList;
}

export type OverCatList = OverCatListItem[];

export interface OverCatListItem {
  name: string;
  resourceCount: number;
}
